//
//  CountCell.m
//  Quick_News
//
//  Created by 曾凯峻 on 15/1/30.
//  Copyright (c) 2015年 zkj. All rights reserved.
//

#import "CountCell.h"

@implementation CountCell
- (void)dealloc
{
    [self.timeLabel release];
    [self.nameLabel release];
    [self.infoLabel release];
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.nameLabel = [[UILabel alloc] init];
     //   self.nameLabel.backgroundColor = [UIColor redColor];
        self.nameLabel.font = [UIFont boldSystemFontOfSize:12.0f];
        self.nameLabel.textColor = [UIColor grayColor];
        [self.contentView addSubview:self.nameLabel];
        [self.nameLabel release];
        
        self.infoLabel = [[UILabel alloc] init];
        self.infoLabel.font = [UIFont boldSystemFontOfSize:14.0f];
        self.infoLabel.numberOfLines = 0;
    //    self.infoLabel.backgroundColor = [UIColor yellowColor];
        [self.contentView addSubview:self.infoLabel];
        [self.infoLabel release];
        
        self.timeLabel = [[UILabel alloc] init];
        self.timeLabel.font = [UIFont boldSystemFontOfSize:12.0f];
        self.timeLabel.textColor = [UIColor grayColor];
    //    self.timeLabel.backgroundColor = [UIColor greenColor];
        [self.contentView addSubview:self.timeLabel];
        [self.timeLabel release];
        
        
        
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    self.nameLabel.frame = CGRectMake(10, 5, self.contentView.frame.size.width - 20, 20);
    
    self.infoLabel.frame = self.contentView.bounds;
    [self.infoLabel sizeToFit];
    self.infoLabel.frame = CGRectMake(10, 25, self.contentView.frame.size.width - 20, self.contentView.frame.size.height - 40);
    
    self.timeLabel.frame = CGRectMake(self.contentView.frame.size.width - 150, self.contentView.frame.size.height - 25, 140, 20);
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
